#include "UdpSever.hpp"
#include<iostream>

void Usage(std::string proc)
{
    std::cerr << "Usage:" << proc << "+ severport" << std::endl; 
}

//./udpsever severport
int main(int argc, char* argv[])
{
    if(argc != 2)
    {
        Usage(argv[0]);
        exit(0);
    }
    uint16_t port = std::stoi(argv[1]);

    EnableConsoleLogStrategy();

    std::unique_ptr<UdpSever> usv = std::make_unique<UdpSever>(port);
    usv->Init();
    usv->Start();

    return 0;
}